<!--
 * @Author: yuanming
 * @Date: 2024-06-30 08:01:12
 * @LastEditors: yuanming
 * @LastEditTime: 2024-10-08 14:55:10
 * @Description: fileDescription
-->
<template>
    <div class="bikeMonitorRightWarp">
        <!-- <div class="title-screen">非机动车泊位统计</div>
        <img src="@/assets/images/icon32.png" class="topImg" alt="" />
        <div class="block">
            <div class="blockItem">
                <img class="leftImg" src="@/assets/images/icon24.png" alt="" />
                <div>
                    <div class="label color1">
                        <img src="@/assets/images/icon28.png" alt="" />
                        <div>非机动车停车路段数</div>
                    </div>
                    <div class="num">
                        <CountConponent :end-val="bikeInfo.num * 1 || 0" :duration="3" />
                    </div>
                </div>
            </div>
            <div class="blockItem">
                <img class="leftImg" src="@/assets/images/icon25.png" alt="" />
                <div>
                    <div class="label color2">
                        <img src="@/assets/images/icon29.png" alt="" />
                        <div>非机动车泊位总面积㎡</div>
                    </div>
                    <div class="num">
                        <CountConponent :end-val="bikeInfo.total * 1 || 0" :duration="3" />
                    </div>
                </div>
            </div>
            <div class="blockItem">
                <img class="leftImg" src="@/assets/images/icon26.png" alt="" />
                <div>
                    <div class="label color3">
                        <img src="@/assets/images/icon30.png" alt="" />
                        <div>市民占用非机动车泊位总面积㎡</div>
                    </div>
                    <div class="num">
                        <CountConponent :end-val="bikeInfo.peopleNum * 1 || 0" :duration="3" />
                    </div>
                </div>
            </div>
            <div class="blockItem">
                <img class="leftImg" src="@/assets/images/icon27.png" alt="" />
                <div>
                    <div class="label color4">
                        <img src="@/assets/images/icon31.png" alt="" />
                        <div>非机动车可用泊位总面积㎡</div>
                    </div>
                    <div class="num">
                        <CountConponent :end-val="bikeInfo.freeNum * 1 || 0" :duration="3" />
                    </div>
                </div>
            </div>
        </div> -->
        <div class="title-screen">单车告警信息</div>
        <div class="scorllWarp">
            <div class="scorllItem">
                <div class="leftBox">
                    <img src="@/assets/images/icon32.png" class="img" alt="" />
                    <div class="label">工业一路</div>
                </div>
                <div class="rightBox">
                    <div class="rowItem">
                        <span class="leftLabel">事件类型：</span>
                        <span>单车损坏</span>
                    </div>
                    <div class="rowItem">
                        <div style="margin-right: auto;">
                            <span class="leftLabel">时间：</span>
                            <span>2024/10/08 13:36:36</span>
                        </div>
                        <div class="status hasDeal">已处理</div>
                    </div>
                    <div class="rowItem">
                        <span class="leftLabel">路段：</span>
                        <span>工业园区一路</span>
                    </div>
                </div>
            </div>
            <div class="scorllItem">
                <div class="leftBox">
                    <img src="@/assets/images/icon32.png" class="img" alt="" />
                    <div class="label">工业一路</div>
                </div>
                <div class="rightBox">
                    <div class="rowItem">
                        <span class="leftLabel">事件类型：</span>
                        <span>单车损坏</span>
                    </div>
                    <div class="rowItem">
                        <div style="margin-right: auto;">
                            <span class="leftLabel">时间：</span>
                            <span>2024/10/08 13:36:36</span>
                        </div>
                        <div class="status noDeal">已处理</div>
                    </div>
                    <div class="rowItem">
                        <span class="leftLabel">路段：</span>
                        <span>工业园区一路</span>
                    </div>
                </div>
            </div>
        </div>
    </div>
</template>
<script setup>
// import CountConponent from '@/components/countToComponent/index.vue'

const { proxy } = getCurrentInstance()

const bikeInfo = ref({})

const getNoBikeSeatInfo = () => {
    proxy.$api.getBikeConfigCount().then((res) => {
        bikeInfo.value = res || {}
    })
}

onMounted(() => {
    getNoBikeSeatInfo()
})
</script>

<style lang="scss" scoped>
.bikeMonitorRightWarp {
    width: 25vw;
    height: auto;
    min-height: 40vh;
    background-image: url('@/assets/images/box_right.png');
    background-size: 100% 100%;
    background-position: center;
    background-repeat: no-repeat;
    position: absolute;
    right: 0.5vw;
    top: 14vh;
    padding: 1vw 1vw;
    box-sizing: border-box;
    z-index: 100;
    .topImg {
        width: 85%;
        height: auto;
        margin: 2vh 0;
    }
    .block {
        width: 85%;
        height: auto;
        .blockItem {
            width: 100%;
            height: auto;
            display: flex;
            flex-direction: row;
            align-items: center;
            padding-left: 0.5vw;
            box-sizing: border-box;
            .num {
                font-size: 1.5vw;
                font-weight: bold;
                font-family: 'YouSheBiaoTiHei';
                width: 100%;
                height: auto;
                background-image: url('@/assets/images/icon33.png');
                background-size: 100% 100%;
                background-position: center;
                background-repeat: no-repeat;
                padding: 0vh 1vw;
                box-sizing: border-box;
                margin-top: 0.5vh;
            }
            .leftImg {
                width: 5.5vw;
                height: 5.5vw;
            }
            .label {
                font-weight: 500;
                font-size: 0.8vw;
                display: flex;
                align-items: center;
                img {
                    width: 1vw;
                    height: 1vw;
                    margin-right: 0.5vw;
                }
            }
            .color1 {
                color: #30B3FF;
            }
            .color2 {
                color: #CFFF4C;
            }
            .color3 {
                color: #FFA19A;
            }
            .color4 {
                color: #5DFF9E;
            }
        }
    }
    .scorllWarp {
        width: 90%;
        height: auto;
        min-height: 40vh;
        overflow-y: auto;
        overflow-x: hidden;
        padding-right: 1vw;
        box-sizing: border-box;
        .scorllItem {
            width: 100%;
            height: auto;
            display: flex;
            flex-direction: row;
            align-items: center;
            justify-content: space-between;
            margin-bottom: 1vh;
            .leftBox {
                width: 30%;
                height: 10vh;
                position: relative;
                .img {
                    width: 100%;
                    height: 100%;
                    position: absolute;
                    top: 0;
                    left: 0;
                    z-index: 50;
                }
                .label {
                    width: 100%;
                    height: 3vh;
                    line-height: 3vh;
                    font-size: 0.7vw;
                    color: #fff;
                    text-align: center;
                    position: absolute;
                    bottom: 0;
                    left: 0;
                    z-index: 100;
                    background-color: rgba($color: #000000, $alpha: 0.3);
                }
            }
            .rightBox {
                width: 67%;
                height: 10vh;
                display: flex;
                flex-direction: column;
                justify-content: space-between;
                padding: 1vh 0 1vh 0.5vw;
                box-sizing: border-box;
                font-size: 0.7vw;
                background-image: url('@/assets/images/icon41.png');
                background-repeat: no-repeat;
                background-size: 100% 100%;
                .rowItem {
                    width: 100%;
                    height: auto;
                    display: flex;
                    flex-direction: row;
                    align-items: center;
                    .leftLabel {
                        color: #FFE07F;
                    }
                    .status {
                        font-size: 1vw;
                        font-weight: 700;
                    }
                    .hasDeal {
                        color: #FFD143;
                    }
                    .noDeal {
                        color: #C2544B;
                    }
                }
            }
        }
    }
}
</style>
